// 动态渲染方法列表
let getContentBodyTempleteStr = (option) => {
  const {list, title} = option;
  return `
    <div class="content-body">
      <div class="content-title">${title}</div>
      <div class="content-text">
        ${list.map((item) => {
          return `
            <span class="text" data-title="${title}" data-key="${item.key}">${item.title}</span>
          `
        }).join('')}
      </div>
    </div>
  `
};

const s2d = (string) => {
  return new DOMParser().parseFromString(string, 'text/html').body
    .childNodes[0]
};

let left = $('.left');

let bodyStr = options.map((item) => {
  return getContentBodyTempleteStr(item);
}).join('');

left.html(bodyStr);
